package com.matrix.index.ui.home.fragment

import android.view.LayoutInflater
import com.matrix.basecore.arouter.ARouterUtils
import com.matrix.basecore.base.BaseFragment
import com.matrix.basecore.constant.Constant
import com.matrix.basecore.utils.glide.GlideUtil
import com.matrix.index.R
import com.matrix.index.databinding.FragmentMineBinding

class MineFragment : BaseFragment<FragmentMineBinding>() {
    override fun getViewBinding(): FragmentMineBinding {
        return FragmentMineBinding.inflate(layoutInflater)
    }

    override fun initView(inflater: LayoutInflater) {

    }

    override fun initData() {
        loadHeader()

//            R.mipmap.icon_module_on
    }

    
    private fun loadHeader() {
//        GlideUtil.loadBlurImage(
//            R.mipmap.icon_module_on,
//            context,
//            mViewBinding.ivBack,
//            8,
//            4,//        )
        GlideUtil.loadCircleImage(
            R.mipmap.icon_module_on,
            context,
            mViewBinding.backdrop,
            R.mipmap.icon_module_on
        )
    }

    override fun initListener() {
        mViewBinding.rlCard.setOnClickListener {
            ARouterUtils.startCardShareActivity()
        }
        mViewBinding.rlAbout.setOnClickListener {
            ARouterUtils.startSettingAboutUs(Constant.ASSETSPATH+"introduce.html","关于我们")
        }

        mViewBinding.rlSetting.setOnClickListener {
            ARouterUtils.startSettingActivity()
        }
    }
}